package org.java.item.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;

/**
 * @author WHQ
 * @version 1.0
 * @date 2022-2-13 0013 下午 2:16
 */
@TableName(value = "shopping_sku")
@NoArgsConstructor
@AllArgsConstructor
public class Sku implements Serializable {

    /**
     * 商品的编码，类型要制定为Long，不要写成int
     */
    @TableId
    private Long id;
    /**
     * 商品类型，本次应用只进行基本功能测试，不涉及到它
     */
    private Long spuId=1L;
    /**
     * 商品的标题
     */
    private String title;
    /**
     * 商品的图片路径
     */
    private String images;
    /**
     * 商品的价格,单位是分----避免在单位转换时，精度丢失
     */
    private Long price;
    /**
     * 商品库存
     */
    private Integer inventory;

    /**
     *商品分类-------
     * 通讯设备-手机-苹果手机
     *  0-0-0
     *  本次应用不涉及该功能
     */
    private String indexes="";
    /**
     * 商品参数设置
     * {"机身颜色":"黑色","内存":"6GB","机身存储":"64GB"}
     * 本次应用不涉及该功能
     */
    private String ownSpec="";
    /**
     * 是否上架
     * true:上架
     * false:下架
     */
    private Boolean enable=true;
    /**
     * 商品的发布时间
     */
    private Date createTime;
    /**
     * 商品的最后修改时间
     */
    private Date lastUpdateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getSpuId() {
        return spuId;
    }

    public void setSpuId(Long spuId) {
        this.spuId = spuId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getImages() {
        return images;
    }

    public void setImages(String images) {
        this.images = images;
    }

    public Long getPrice() {
        return price;
    }

    public void setPrice(Long price) {
        this.price = price;
    }

    public Integer getInventory() {
        return inventory;
    }

    public void setInventory(Integer inventory) {
        this.inventory = inventory;
    }

    public String getIndexes() {
        return indexes;
    }

    public void setIndexes(String indexes) {
        this.indexes = indexes;
    }

    public String getOwnSpec() {
        return ownSpec;
    }

    public void setOwnSpec(String ownSpec) {
        this.ownSpec = ownSpec;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(Date lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }
}
